//
// Created by user on 2022/1/13.
//
#include <iostream>
#include <vector>
using namespace std;
int removeDuplicates(vector<int>& nums) {
    if(nums.empty()){return 0;}
    int n = nums.size();
    int left=0;
    int right=1;
    while (right<n){
        if(nums[right]!=nums[left]){
            left++;
            nums[left] = nums[right];
        }
        right++;
    }
    return left+1;
}
int main(){


    return 0;
}